<?php
/**
 * Created by PhpStorm.
 * Author: ls
 * Time: 2023/10/25 9:17
 * Desc: 拼团服务
 */
abstract class Contract_Api_Together
{
    use Trait_Api_Image;

    /**
     * 拼团查询
     * @param $params
     * @return array
     */
    abstract function query($params):array;

    /**
     * @param $id
     * @param bool $need_format
     * @param array $params
     * @return array
     * 拼团详情
     */
    abstract function detail($id, bool $need_format = true, array $params = []):array;

    /**
     * 获取可凑团列表
     * @param $id
     * @param int $start
     * @param int $limit
     * @return array
     * @throws Exception
     */
    abstract function pending_join_list($id, int $start = 0, int $limit = 100):array;

    /**
     * 获取预订限制
     * @param $id
     * @return array
     * @throws Exception
     */
    abstract function order_limit($id):array;

    /**
     * 会员的拼团
     * @param $mid
     * @param $params
     * @return array
     */
    abstract function get_member_join($mid, $params):array;

    /**
     * 会员的拼团详情
     * @param $mid
     * @param $join_id
     * @return array
     * @throws Exception
     */
    abstract function get_member_join_detail($mid, $join_id):array;

    /**
     * 拼团分享信息
     * @param $mid
     * @param $params
     * @return array
     * @throws Exception
     */
    abstract function get_share_info($mid, $params):array;
}